﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace SurfacePlatform
{
    class Shot
    {
        private Vector2 position;
        private Player owner;
        private float speed = 6;
        private Vector2 velocity;
        private int damage;
        private bool flaggedForRemoval = false;

        public Player Owner
        {
            get { return owner; }
            set { owner = value; }
        }
        public Vector2 Position
        {
            get { return position; }
            set { position = value; }
        }
        public Vector2 Velocity
        {
            get { return velocity; }
            set { velocity = value; }
        }
        public int Damage
        {
            get { return damage; }
            set { damage = value; }
        }
        public bool FlaggedForRemoval
        {
            get { return flaggedForRemoval; }
            set { flaggedForRemoval = value; }
        }

        public Shot(Player owner, int dmg)
        {
            this.owner = owner;
            this.damage = dmg;
            position = owner.Position;
            velocity = speed * Vector2.Transform(owner.Gravity, Matrix.CreateRotationZ(-(float)Math.PI / 2));
        }
    }
}
